BCD_TO_LINT block

Short summary

Name

BCD_TO_LINT

→POU type

→function

Category

IEC-block, Convert

Conform to →IEC-standard

(tick) no restrictions

Graphical interface

Available since

version 1.22.0 (for Neuron Power Engineer)

Functionality

The block converts a binary coded decimal value (a →BCD-value) into a decimal value of data type LINT.

At input IN, connect the BCD-value that should be converted. If it is not a valid BCD-value, the result of the block is not defined.

Inputs, return value

 

Identifier

→Data type

Description

Inputs:

IN

BYTEWORDDWORD or LWORD

BCD input value

Return value:

LINT

 

Input EN and output ENO are available when →calling the block. See "Execution control: EN, ENO" for information on input EN and output ENO.

See:

Example for usage within ST-editor

PROGRAM Test
    VAR
        result : LINT;
    END_VAR
    result := BCD_TO_LINT(IN := 16#12345);       (* The variable 'result' evaluates to '12345'. *)
END_PROGRAM

When creating your application within the ST-editor, enter a call of a block by typing the text as requested by the syntax or use Content Assist.